package com.haidechizi.designpattern.proxy.dynamic.jdk;

import com.haidechizi.designpattern.proxy.dynamic.IStudentService;
import com.haidechizi.designpattern.proxy.dynamic.Student;
import com.haidechizi.designpattern.proxy.dynamic.StudentServiceImpl;

/**
 * @author haidechizi
 */
public class JdkDynamicProxyMain {

    public static void main(String[] args) {
        IStudentService studentService = new StudentServiceImpl();
        studentService = ProxyHelper.getProxy(studentService);
        Student student = new Student(1L, "Jack", 18);
        studentService.save(student);
    }

}
